var theMiddle = document.getElementsByClassName("Middle")
var theXX = document.getElementsByClassName("xxx")

for(var i = 0; i < theMiddle.length; i++) {
	theMiddle[i].ind = i
	theMiddle[i].onclick = function() {
		if(a == false) {
			theXX[this.ind].style.display = "block"
			a = true;
		} else {
			theXX[this.ind].style.display = "none"
			a = false;
		}
	}
}